<html><head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class attributes" rel=Appendix href="index_attributes.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of classes" rel=Appendix href="index_classes.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Conteur" rel="Chapter" href="Conteur.html">
<link title="Definition" rel="Chapter" href="Definition.html">
<link title="Ds_commun" rel="Chapter" href="Ds_commun.html">
<link title="Joueur" rel="Chapter" href="Joueur.html">
<link title="Joueur2" rel="Chapter" href="Joueur2.html">
<link title="Joueur3" rel="Chapter" href="Joueur3.html">
<link title="Perso_olivier" rel="Chapter" href="Perso_olivier.html">
<link title="Regles" rel="Chapter" href="Regles.html"><title>Perso_olivier.init</title>
</head>
<body>
<code class="code"><span class="keyword">let</span>&nbsp;init&nbsp;objet&nbsp;=&nbsp;<span class="comment">(*je&nbsp;comprend&nbsp;pas&nbsp;bien&nbsp;a&nbsp;quoi&nbsp;elle&nbsp;sert:&nbsp;tu&nbsp;reinitialise&nbsp;le&nbsp;nombre&nbsp;de&nbsp;LG&nbsp;à&nbsp;chaque&nbsp;appel&nbsp;de&nbsp;pose_question&nbsp;cest&nbsp;à&nbsp;dire&nbsp;20000&nbsp;fois&nbsp;pas&nbsp;partie*)</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print_string&nbsp;<span class="string">"je&nbsp;comprend&nbsp;pas&nbsp;bien&nbsp;a&nbsp;quoi&nbsp;elle&nbsp;sert\n"</span>;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">if</span>&nbsp;!nb_loups&nbsp;=&nbsp;0&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">then</span>&nbsp;nb_loups:=&nbsp;(objet<span class="keywordsign">#</span>get_nbjoueurs)/3&nbsp;;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nb_villageois:=&nbsp;(objet<span class="keywordsign">#</span>get_nbjoueurs)&nbsp;-&nbsp;(!nb_loups)&nbsp;;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">match</span>&nbsp;objet<span class="keywordsign">#</span>who_am_i&nbsp;<span class="keyword">with</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span>&nbsp;<span class="constructor">Loup</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;&nbsp;tableau_id.(objet<span class="keywordsign">#</span>get_id)&nbsp;&lt;-&nbsp;<span class="constructor">Loup</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span>&nbsp;<span class="constructor">Voyante</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;tableau_id.(objet<span class="keywordsign">#</span>get_id)&nbsp;&lt;-&nbsp;<span class="constructor">Voyante</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span>&nbsp;<span class="constructor">Sorciere</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;tableau_id.(objet<span class="keywordsign">#</span>get_id)&nbsp;&lt;-&nbsp;<span class="constructor">Sorciere</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span>_<span class="keywordsign">-&gt;</span>()</code></body></html>